﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using MVVM.Demo.StockProvider;
using System.Collections.ObjectModel;

namespace MVVM.Demo.Client
{
    /// <summary>
    /// Interaction logic for WatchList.xaml
    /// </summary>
    public partial class WatchList : Window
    {
        private readonly RandomQuoteSource _quoteSource = new RandomQuoteSource();
        private WatchListViewModel _vm;

        public WatchList()
        {
            InitializeComponent();

            _vm = new WatchListViewModel(_quoteSource);
            this.DataContext = _vm;
        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            _vm.Subscribe();
        }

    }
}
